/*
 * @Author: your name
 * @Date: 2020-10-03 10:01:47
 * @LastEditTime: 2020-10-03 10:17:01
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \woniutaofang\lib\pages\home\home_router.dart
 */
import 'package:fluro/fluro.dart';
import 'package:woniutaofang/pages/home/page/Property/property_page.dart';
import 'package:woniutaofang/pages/home/page/home_page.dart';
import 'package:woniutaofang/routers/router_init.dart';

class HomeRouter implements IRouterProvider {
  static String homePage = '/homePage';
  static String homeProperty = '/homeProperty';

  @override
  void initRouter(Router router) {
    router.define(
      homePage,
      handler: Handler(
        handlerFunc: (_, __) => HomePage(),
      ),
    );
    router.define(
      homeProperty,
      handler: Handler(
        handlerFunc: (_, params) {
          String id = params['id']?.first;
          return PropertyPage(id);
        },
      ),
    );
  }
}
